#include "nomeshremarkactor.h"
#include "transformable.h"

namespace VrDataCore
{
	NoMeshRemarkActor::NoMeshRemarkActor()
	{
		setClassName(CLASS_NOMESHREMARK);
	}

	NoMeshRemarkActor::~NoMeshRemarkActor()
	{}

	void NoMeshRemarkActor::buildPropertyMap()
	{
		RemarkActorBase::buildPropertyMap();
	}

	void NoMeshRemarkActor::createDrawable()
	{
		_drawable = new CoreBase::Transformable(this);
		_root = new osg::Group;
		_planeShape = new CoreBase::PlaneShape;
		osg::Vec3 p1(-10.1f,-10.0001f,0.0f);
		osg::Vec3 p2(10.1f,-10.0001f,0.0f);
		osg::Vec3 p3(10.1f,10.0001f,0.0f);
		osg::Vec3 p4(-10.1f,10.0001f,0.0f);
		_planeShape->reset(p1,p2,p3,p4,osg::Vec2(0.0f,0.0f),osg::Vec2(1.0f,0.0f),
				osg::Vec2(1.0f,1.0f),osg::Vec2(0.0f,1.0f),_ss);
		_root->addChild(_planeShape->getOSGNode());
		_drawable->getOSGNode()->asGroup()->addChild(_root);
	}
}